<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>站点</title>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<script type="text/javascript">
	function setXyy(){
		var xyy = "${sitePage.lbxyy}";
		$("#lbxyy").val(xyy);
	}
</script>
</head>
<body>
	<t:formvalid formid="formobj" dialog="true" usePlugin="password" 
		layout="table" action="siteController.do?save" >
		<input id="id" name="id" type="hidden" value="${sitePage.id }">
		<div style="width: 1200px;height: 500px;overflow-y: auto;">
			<table 
				cellpadding="0" cellspacing="1" class="formtable">
				<tr>
					<td colspan="4" align="center"
						style="font-size: 16px;background-color: white;height: 28px;color:blue;font-weight: bold;">基础信息</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label"> 名称:
					</label></td>
					<td class="value"><input class="inputxt" id="mc" name="mc"
						datatype="*" value="${sitePage.mc}"> <span
						class="Validform_checktip"></span>
					</td>
					<td align="right"><label class="Validform_label">
							网站根路径: </label>
					</td>
					<td class="value"><input class="inputxt" id="gdz" name="gdz"
						ignore="ignore" value="${sitePage.gdz}"> <span
						class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							站点地址: </label>
					</td>
					<td class="value" colspan="3"><textarea class="textareaclass"
							id="zddz" name="zddz">${sitePage.zddz}</textarea> <span
						class="Validform_checktip">关键词请用{keyword}来替换</span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							监测类型: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="nmstype"
							field="jclx" hasLabel="false" defaultVal="${sitePage.jclx}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>

					<td align="right"><label class="Validform_label">
							关键词编码: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="gjcbm"
							field="gjcbm" hasLabel="false" defaultVal="${sitePage.gjcbm}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							网页字符集: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="zfj"
							field="wyzfj" hasLabel="false" defaultVal="${sitePage.wyzfj}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
					<td align="right"><label class="Validform_label">
							内页字符集: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="zfj"	field="nyzfj" hasLabel="false" defaultVal="${sitePage.nyzfj}"></t:dictSelect>
						<span class="Validform_checktip">设置内页的字符集</span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							智能编码: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="YN"
							field="znbm" hasLabel="false" defaultVal="${sitePage.znbm}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>

				</tr>
				<tr>
					<td colspan="4" align="center"
						style="font-size: 16px;background-color: white;height: 28px;color:blue;font-weight: bold;">代理配置</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							使用代理: </label>
					</td>
					<td class="value">
						<t:dictSelect typeGroupCode="YN" field="sydl" hasLabel="false" defaultVal="${sitePage.sydl}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
					<td align="right"><label class="Validform_label">
							被封特征码: </label>
					</td>
					<td class="value"><input class="inputxt" id="bftzm" name="bftzm"
						ignore="ignore" value="${sitePage.bftzm}">
						<span class="Validform_checktip"></span>
					</td>
				</tr>

				<tr>
					<td colspan="4" align="center"
						style="font-size: 16px;background-color: white;height: 28px;color:blue;font-weight: bold;">XPATH配置</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							列表提取: </label>
					</td>
					<td class="value"><input class="inputxt" id="lbtq" name="lbtq"
						datatype="*" value="${sitePage.lbtq}"> <span
						class="Validform_checktip"></span>
					</td>
					<td align="right"><label class="Validform_label">
							判重方式: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="pcfs"
							field="pcfs" hasLabel="false" defaultVal="${sitePage.pcfs}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							下一页获取方式: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="xyyfx"
							field="xyyhqfs" hasLabel="false" defaultVal="${sitePage.xyyhqfs}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
					<td align="right"><label class="Validform_label"> 下一页:
					</label>
					</td>
					<td class="value"><input class="inputxt" id="lbxyy"
						name="lbxyy" datatype="*" 	> <span
						class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							正文标题: </label>
					</td>
					<td class="value"><input class="inputxt" id="zwbt" name="zwbt"
						datatype="*" value="${sitePage.zwbt}"> <span
						class="Validform_checktip"></span>
					</td>

					<td align="right"><label class="Validform_label"> 屏蔽词:
					</label>
					</td>
					<td class="value"><input class="inputxt" id="pbc" name="pbc"
						ignore="ignore" value="${sitePage.pbc}"> <span
						class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							正文内容: </label>
					</td>
					<td class="value"><input class="inputxt" id="zwnr" name="zwnr"
						datatype="*" value="${sitePage.zwnr}"> <span
						class="Validform_checktip"></span>
					</td>
					<td align="right"><label class="Validform_label">
							正文连接: </label>
					</td>
					<td class="value"><input class="inputxt" id="zwlj" name="zwlj"
						ignore="ignore" value="${sitePage.zwlj}"> <span
						class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							获取时间方式: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="sjhqfs"
							field="sjhqfs" hasLabel="false" defaultVal="${sitePage.sjhqfs}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
					<td align="right"><label class="Validform_label">
							正文时间: </label>
					</td>
					<td class="value"><input class="inputxt" id="zwsj" name="zwsj"
						ignore="ignore" value="${sitePage.zwsj}"> <span
						class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td colspan="4" align="center"
						style="font-size: 16px;background-color: white;height: 28px;color:blue;font-weight: bold;">二次跳转</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							是否有二次跳转: </label>
					</td>
					<td class="value" colspan="3"><t:dictSelect typeGroupCode="YN"
							field="rctz" hasLabel="false" defaultVal="${sitePage.rctz}"></t:dictSelect>
						<span class="Validform_checktip">部分网站是通过二次跳转来实现展示内容页的,这时需要将此项选为'是'并在下面配置'前部'和'后部'.</span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							二次跳转链接前部: </label>
					</td>
					<td class="value">
						<textarea id="rcljqb" name="rcljqb" ignore="ignore" class="textareaclass">${sitePage.rcljqb}</textarea>
						<span class="Validform_checktip"></span>
					</td>
					<td align="right"><label class="Validform_label">
							二次跳转链接后部: </label>
					</td>
					<td class="value" colspan="3">
						<textarea id="rcljhb" name="rcljhb" ignore="ignore" class="textareaclass">${sitePage.rcljhb}</textarea><span
						class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td colspan="4" align="center"
						style="font-size: 16px;background-color: white;height: 28px;color:blue;font-weight: bold;">其他属性</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							分析方式: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="FXFS"
							field="fxfs" hasLabel="false" defaultVal="${sitePage.fxfs}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>

					<td align="right"><label class="Validform_label">
							默认抓取站点: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="YN"
							field="mrzq" hasLabel="false" defaultVal="${sitePage.mrzq}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right"><label class="Validform_label">
							启用状态: </label>
					</td>
					<td class="value"><t:dictSelect typeGroupCode="status"
							field="qyzt" hasLabel="false" defaultVal="${sitePage.qyzt}"></t:dictSelect>
						<span class="Validform_checktip"></span>
					</td>

					<td align="right"><label class="Validform_label"> 顺序号:
					</label>
					</td>
					<td class="value"><input class="ninputxt" id="sxh" name="sxh"
						ignore="ignore" value="${sitePage.sxh}" datatype="n"> <span
						class="Validform_checktip"></span>
					</td>
				</tr>
				
				<!-- 测试 -->
				<tr>
					<td colspan="4" align="center"
						style="font-size: 16px;background-color: white;height: 28px;color:blue;font-weight: bold;">测试</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label"> 测试关键词:
						</label>
					</td>
					<td class="value">
						<input class="inputxt" id="test_keyword" name="test_keyword" value="阅兵">
						<span class="Validform_checktip"></span>
					</td>
					<td class="value" colspan="2">
						<a href="#" onclick="testSite()">点击测试</a>
					</td>
				</tr>
				<tr>
					<td class="value" colspan="4">
						测试结果：<br>
						<div id="test_result" style="line-height: 28px;">
							
						</div>
					</td>
				</tr>
				<!-- 测试  end -->
				<script>
					function testSite(){
						$("#test_result").html("");
						$.ajax({
						    type:'post',
						    url:'testSiteController.do?test',
						    dataType:'json',
						    data:$('#formobj').serialize(),
						    success: function(data){
						    	$("#test_result").html(data.msg);
						    }
						});
					}
				</script>
			</table>
		</div>
	</t:formvalid>
	<script type="text/javascript">
		setXyy();
	</script>
</body>